package org.d7_buffered_stream;

import java.io.*;

/**
 * 目标：掌握字符缓冲输出流的用法
 */
public class BufferedWriterTest3 {
    public static void main(String[] args) {
        try (

                Writer fw = new FileWriter("D:\\idea\\idea code\\java-practice\\practice\\change\\file-oi-app\\src\\d7test3.txt");
                    //创建一个字符缓冲输出流包装原始的字符输出流
                    BufferedWriter bw = new BufferedWriter(fw);)
        {
            bw.write('a');
            bw.write('b');
            bw.write(98);
            bw.write('王');
            bw.newLine();

            bw.write("我爱你");
            bw.newLine();

        } catch (IOException e) {

            throw new RuntimeException(e);
        }
    }
}
